package xyz.lilei23.framework.core;

/**
 * 后置处理器
 * @author jack
 * @date 31/07/2021 16:20
 * @version 1.0
 **/
public interface BeanPostProcessor {

    /**
     *  后置处理器前置处理
     * @param bean bean
     * @param beanName beanId
     * @return 对象
     * @throws RuntimeException 异常
     */
    default Object postProcessBeforeInitialization(Object bean, String beanName) throws RuntimeException {
        return bean;
    }

    /**
     * 后置处理器后置处理
     * @param bean bean
     * @param beanName beanId
     * @return 对象
     * @throws RuntimeException 异常
     */
    default Object postProcessAfterInitialization(Object bean, String beanName) throws RuntimeException  {
        return bean;
    }
}
